<!--{include(pe_tpl('header.html'));}-->
<div class="right_page">
	<div class="now">
		<!--{foreach($ini['quan_state'] as $k=>$v):}-->
		<a href="admin.php?mod=quan&state={$k}" <!--{if(strlen($_g_state) && $k==$_g_state):}-->class="sel"<!--{endif;}-->>{$v}（{$tongji[$k]}）<i></i></a>
		<!--{endforeach;}-->
		<a href="admin.php?mod=quan&act=add" id="fabu">添加优惠券</a>
		<div class="clear"></div>
	</div>
	<div class="right_main">
		<form method="post" id="form">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
		<tr>
			<th class="bgtt" width="50">ID号</th>
			<th class="bgtt" width="40"></th>
			<th class="bgtt left">优惠券名称</th>
			<th class="bgtt" width="100">领取方式</th>
			<th class="bgtt" width="100">限定商品</th>
			<th class="bgtt" width="100">发放数量</th>
			<th class="bgtt" width="100">领取/使用</th>
			<th class="bgtt" width="100">有效日期</th>
			<!--<th class="bgtt" width="100">创建日期</th>-->
			<th class="bgtt" width="100">状态</th>
			<th class="bgtt" width="100">操作</th>
		</tr>
		<!--{foreach($info_list as $v):}-->
		<tr>
			<td>{$v['quan_id']}</td>
			<td><img src="{$pe['host_tpl']}image/quan.png" style="width:40px;" /></td>
			<td class="left">
				<a href="{pe_url('quan-'.$v['quan_id'])}" target="_blank" class="cblue">{$v['quan_name']}</a>
				<p>{$v['quan_money']}元<span class="c999">（满{$v['quan_limit']}元可用）</span></p>
			</td>
			<td>{$ini['quan_type'][$v['quan_type']]}<!--{if($v['quan_code']):}--><p class="mat2"><span class="tag_gray">{$v['quan_code']}</span></p><!--{endif;}-->	</td>
			<td>{$v['product_id']?count(explode(',', $v['product_id'])).'个':'-'}</td>
			<td>{$v['quan_num']}</td>
			<td><a href="admin.php?mod=quan&act=mylog&id={$v['quan_id']}" class="admin_btn" style="min-width:50px" onclick="return pe_dialog(this, '优惠券【{$v['quan_name']}】领取记录', 900, 600)">{$v['quan_num_get']} <span class="c999">/</span> {$v['quan_num_use']}</a></td>
			<td>
				<!--{if($v['quan_datetype'] == 'relative'):}-->
				自领取{$v['quan_day']}天内
				<!--{else:}-->
				{$v['quan_sdate']}<br/>{$v['quan_edate']}	
				<!--{endif;}-->
			</td>
			<!--<td>{pe_date($v['quan_atime'], 'Y-m-d')}</td>-->
			<td>
				<!--{if($v['quan_state']):}-->
				<span class="cgreen">{$ini['quan_state'][$v['quan_state']]}</span>
				<p><a href="javascript:pe_confirm('优惠券失效', 'admin.php?mod=quan&act=cancel&id={$v['quan_id']}&token={$pe_token}')" class="cblue font12">点击失效</a></p>
				<!--{else:}-->
				<del class="c999">{$ini['quan_state'][$v['quan_state']]}</del>	
				<!--{endif;}-->		
			</td>
			<td>
				<!--{if($v['quan_state']):}-->
				<a href="admin.php?mod=quan&act=edit&id={$v['quan_id']}" class="admin_edit mar3">修改</a>
				<!--{endif;}-->	
				<a href="javascript:pe_confirm('删除', 'admin.php?mod=quan&act=del&id={$v['quan_id']}&token={$pe_token}')" class="admin_del mar3">删除</a>
			</td>
		</tr>
		<!--{endforeach;}-->
		</table>
		</form>
	</div>
	<div class="right_bottom">
		<span class="fr fenye">{$db->page->html}</span>
		<div class="clear"></div>
	</div>
</div>
<!--{include(pe_tpl('footer.html'));}-->